home *** CD-ROM | disk | FTP | other *** search
/ SGI O2 Out of Box Experience / SGI O2 Out of Box Experience.iso / SysTour / framing.script < prev    next >
Text File  |  1996-11-14  |  1KB  |  69 lines

  1. <SCRIPT LANGUAGE="JavaScript">
  2.  
  3. <!-- Generate activity frames
  4. function document_base() {
  5.  
  6.   var docPath = document.location;
  7.  
  8.   var suffixChar = docPath.length - 5;
  9.  
  10.   var docPrefix = docPath.substring(0, suffixChar);
  11.  
  12.   return docPrefix;
  13. }
  14.  
  15. function activity_page(activity) {
  16.  
  17.   return document_base() + '#' + activity + '_activities.html';
  18. }
  19.  
  20. function jump_location(activity) {
  21.  
  22.   return document_base() + '#' + activity + '.html';
  23. }
  24.  
  25. function cache_jump(activity) {
  26.  
  27.   document.cookie = jump_location(activity);
  28. }
  29.  
  30. function frame_activity(activity) {
  31.  
  32.   var mod_page = jump_location(activity);
  33.  
  34.   var act_page = activity_page(activity);
  35.  
  36.   document.open("text/plain");
  37.   
  38.   document.writeln('<HTML>');
  39.  
  40.   document.writeln('<FRAMESET ROWS="50%,50%">');
  41.  
  42.   document.writeln('<FRAME SRC=' + mod_page + 'NAME="MODULE" SCROLLING="auto" NORESIZE>"');
  43.  
  44.   document.writeln('<FRAMESET COLS="160,565">');
  45.  
  46.   document.writeln('<FRAME MARGINWIDTH="0" SRC="" NAME="RETURN" SCROLLING="NO" NORESIZE>');
  47.  
  48.   document.writeln('<FRAME SRC=' + act_page + 'NAME="ACTIVITY" SCROLLING="AUTO" NORESIZE>');
  49.  
  50.   document.writeln('</FRAMESET>');
  51.  
  52.   document.writeln('</FRAMESET>');
  53.  
  54.   document.writeln('</HTML>');
  55.  
  56.   document.close();
  57.  
  58.   return true;
  59. }
  60.  
  61. function show_activity(message) {
  62.  
  63.   top.status = message;
  64.  
  65.   return true;
  66. }
  67.  
  68. // end of activity generation code -->
  69. </SCRIPT>